package steven.sdc.appPoker.Adapter;

import java.util.ArrayList;

import steven.sdc.appPoker.Items.ItemLuuTroChoi;
import steven.sdc.appPoker.Items.ItemNguoiChoi;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.amurani.slidingmenu.R;

public class AdapterLuuTroChoi extends ArrayAdapter<ItemLuuTroChoi> {
	private ArrayList<ItemLuuTroChoi> Items;
	int layoutId;
	Context frag;
	LayoutInflater inflater;
	

	public  AdapterLuuTroChoi(Context frag, int layoutId,ArrayList<ItemLuuTroChoi> list) {
		super(frag, R.layout.list_item_luutroc, list);
		this.frag=frag;
		this.layoutId=layoutId;
		this.Items=list;
		inflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			// TODO Auto-generated constructor stub
		}
	public View getView(int position, View view, ViewGroup parent) {
    	
        view = inflater.inflate(R.layout.list_item_luutroc, null);
        TextView stt=(TextView)view.findViewById(R.id.text_luutrochoi_stt);
        TextView ngay=(TextView)view.findViewById(R.id.text_luutrochoi_ngay);
        TextView trandadau=(TextView)view.findViewById(R.id.text_luutrochoi_vandadau);
        TextView ten1=(TextView)view.findViewById(R.id.text_luutrochoi_ten1);
        TextView ten2=(TextView)view.findViewById(R.id.text_luutrochoi_ten2);
        TextView ten3=(TextView)view.findViewById(R.id.text_luutrochoi_ten3);
        TextView ten4=(TextView)view.findViewById(R.id.text_luutrochoi_ten4);
        ItemLuuTroChoi item = Items.get(position);
        stt.setText(""+item.id);
        ngay.setText(""+item.ngay);
        trandadau.setText(""+item.trandadau);
        ten1.setText(""+item.ten1);
        ten2.setText(""+item.ten2);
        ten3.setText(""+item.ten3);
        ten4.setText(""+item.ten4);
        return view;
    }

}
